﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
	xmlns:theGameControls="clr-namespace:Waaahsabi.Controls.TheGame;assembly=Waaahsabi.Controls.TheGame"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:dwmControls="clr-namespace:Waaahsabi.Controls.DWM;assembly=Waaahsabi.Controls.DWM"
	mc:Ignorable="d"
	x:Class="TheGameClient.GenericSystemInterface"
	d:DesignWidth="640" d:DesignHeight="480">
	<UserControl.Resources>
		<Storyboard x:Name="FlashStatusBar">
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border" RepeatBehavior="Forever">
				<DiscreteColorKeyFrame KeyTime="0" Value="#19FFFFFF"/>
				<DiscreteColorKeyFrame KeyTime="0:0:0.25" Value="#FF400000"/>
				<DiscreteColorKeyFrame KeyTime="0:0:0.5" Value="#19FFFFFF"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="FlashProgressBar">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="traceViewItem" RepeatBehavior="Forever">
				<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
				<DiscreteDoubleKeyFrame KeyTime="0:0:0.25" Value="0"/>
				<DiscreteDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>

	<Border x:Name="LayoutRoot" Background="{StaticResource TargetingControlBackground}" BorderBrush="Black" BorderThickness="1">
		<VisualStateManager.CustomVisualStateManager>
			<ei:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="DefaultStates" ei:ExtendedVisualStateManager.UseFluidLayout="True">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.2">
						<VisualTransition.GeneratedEasingFunction>
							<CubicEase EasingMode="EaseInOut"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Welcome">
					<Storyboard>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="featureList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="securityList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="subSystemDisplay" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btnBack" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="securityList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="subSystemDisplay">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="securityList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="subSystemDisplay">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="SecurityList">
					<Storyboard>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="featureList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcomeScreen" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="subSystemDisplay" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="welcomeScreen">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="subSystemDisplay">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="welcomeScreen">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="subSystemDisplay">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Subsystem">
					<Storyboard>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="featureList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcomeScreen" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="securityList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btnBack" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="welcomeScreen">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="securityList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="welcomeScreen">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="securityList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="FeatureList">
					<Storyboard>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcomeScreen" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="securityList" d:IsOptimized="True"/>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="subSystemDisplay" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="featureList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="welcomeScreen">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="securityList">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="subSystemDisplay">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
			<VisualStateGroup x:Name="Tracing">
				<VisualState x:Name="TraceRunning">
					<Storyboard>
						<ColorAnimation Duration="0" To="#BF400000" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textBlock">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="stackPanel">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="TraceIdle"/>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid>
			<theGameControls:GenericFeatureList x:Name="featureList" Margin="10,10,10,32" Description="These features are available on this computer system. Please note that access to one or all of these systems might be logged." Title="Available features on this system"/>
			<theGameControls:GenericWelcomeScreen x:Name="welcomeScreen" VerticalAlignment="Top" d:LayoutOverrides="Width" Margin="10,10,10,32"/>
			<theGameControls:GenericFeatureList x:Name="securityList" Margin="10,10,10,32" Description="In order to access this computer system, you need to authorize against the security checks below. Please be aware that repeated failure to access these functions will have severe consequences. All access attempt will be logged." Title="Authorization required"/>
			<theGameControls:GenericSubSystemInterface x:Name="subSystemDisplay" Margin="32,10,10,32"/>
			<Button x:Name="btnBack" HorizontalAlignment="Left" VerticalAlignment="Top" Width="24" Style="{StaticResource BackButtonStyle}" Margin="3,3,0,0" Opacity="0">
				<Path Stretch="Fill" Data="F1 M 480,128L 544,192L 480,256L 480,128 Z " UseLayoutRounding="True" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Width="6" Height="12" Margin="0,0,2,0">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-180"/>
							<TranslateTransform/>
						</TransformGroup>
					</Path.RenderTransform>
					<Path.Fill>
						<SolidColorBrush Color="{StaticResource TheGameDarkBlue}"/>
					</Path.Fill>
				</Path>
			</Button>
			<Border x:Name="border" BorderBrush="Black" BorderThickness="0,0.5,0,0" Height="30" VerticalAlignment="Bottom" Background="#19FFFFFF">
				<Grid Margin="5,0">
					<TextBlock TextWrapping="Wrap" Text="Current trace status:" Foreground="White" VerticalAlignment="Center" FontFamily="/TheGameClient;component/Fonts/Fonts.zip#Bavaria Regular" FontSize="8" HorizontalAlignment="Left"/>
					<TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="No trace detected." VerticalAlignment="Center" Foreground="White" FontFamily="/TheGameClient;component/Fonts/Fonts.zip#Bavaria Regular" FontSize="8" Margin="110,0,0,0" HorizontalAlignment="Left"/>
					<Grid x:Name="stackPanel" Margin="110,0,0,0" Visibility="Collapsed" >
						<dwmControls:TraceViewItem x:Name="traceViewItem" VerticalAlignment="Center" Width="Auto" InitialTime="50000" Height="20">
							<dwmControls:TraceViewItem.Effect>
								<DropShadowEffect ShadowDepth="0" Color="#FFFFC700" BlurRadius="10"/>
							</dwmControls:TraceViewItem.Effect>
						</dwmControls:TraceViewItem>
					</Grid>
				</Grid>
			</Border>
		</Grid>
	</Border>
</UserControl>